/********************************************
* TABLE A9: Staff Education Info Availability
*********************************************/
* house
clear
use masterdata_house1.dta
keep if totworkdays > 180
gen female = 0
replace female = 1 if gender =="F"
by core_person_id, sort: gen tt = 1 if _n == 1
tab degreeinfo if tt ==1

tabstat female rank nondc ptime dem if degreeinfo == 1 & tt ==1, stat(N mean p50) col(stat)
tabstat female rank nondc ptime dem if degreeinfo == 0 & tt ==1, stat(N mean p50) col(stat)

ttest female if tt ==1, by(degreeinfo)
ttest rank if tt ==1, by(degreeinfo)
ttest nondc if tt ==1, by(degreeinfo)
ttest ptime if tt ==1, by(degreeinfo)
ttest dem if tt ==1, by(degreeinfo)

* senate
clear
use masterdata_senate1.dta
keep if totworkdays > 180
gen female = 0
replace female = 1 if gender =="F"
by core_person_id, sort: gen tt = 1 if _n == 1
sum degreeinfo if tt ==1

tabstat female rank nondc ptime dem if degreeinfo == 1 & tt ==1, stat(N mean p50) col(stat)
tabstat female rank nondc ptime dem if degreeinfo == 0 & tt ==1, stat(N mean p50) col(stat)

ttest female if tt ==1, by(degreeinfo)
ttest rank if tt ==1, by(degreeinfo)
ttest nondc if tt ==1, by(degreeinfo)
ttest ptime if tt ==1, by(degreeinfo)
ttest dem if tt ==1, by(degreeinfo)

